#!/bin/sh

# stop blowing compiled stuff
rm -rf builds/out-self
mkdir -p builds/out-self

if ! bin/cljsc src/test/self/self_host  "{:optimizations :simple :static-fns true :output-dir \"builds/out-self\" :optimize-constants true :verbose true :compiler-stats true :parallel-build true :target :nodejs}" > builds/out-self/core-self-test.js; then
  >&2 echo ClojureScript compilation failed
  exit 1
fi;

echo "Testing with Node"
node builds/out-self/core-self-test.js
